package com.hnkywl.sts.entity.zjgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.htgl.Ht;
import com.hnkywl.sts.entity.organ.Gsjg;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * 说明：异议赔付实体类
 * 包:        com.hnkywl.sts.entity.zjgl
 * 类描述:    异议赔付
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */

@Entity
@Table(name = "T_BIZ_YYPF")
@Where(clause = "deleted!='1'")
public class Yypf extends BaseEntity {

    @Id
    @SequenceGenerator(name = "seqYypf", allocationSize = 1, sequenceName = "SEQ_BIZ_YHSX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqYypf")
    private Long id;

    /**
     * 备注
     */
    private String bz;

    /**
     * 异议赔付金额
     */
    private Double yypfje;

    /**
     * 使用状态，0未使用，1已使用
     */
    private Integer syzt;

    @ManyToOne(cascade = CascadeType.MERGE, targetEntity = Ht.class)
    @JoinColumn(name = "HT_ID")
    private Ht ht;

    /**
     * 客户
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "KH_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg gsjg;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Double getYypfje() {
        return yypfje;
    }

    public void setYypfje(Double yypfje) {
        this.yypfje = yypfje;
    }

    public Integer getSyzt() {
        return syzt;
    }

    public void setSyzt(Integer syzt) {
        this.syzt = syzt;
    }

    public Ht getHt() {
        return ht;
    }

    public void setHt(Ht ht) {
        this.ht = ht;
    }

    public Gsjg getGsjg() {
        return gsjg;
    }

    public void setGsjg(Gsjg gsjg) {
        this.gsjg = gsjg;
    }
}
